/**
 * 
 */
package com.jquery.ui.core.bean;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author linyajun
 * 
 * @date	2013-9-18
 * @description   
 */
public abstract class UIBean implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -315776580022304460L;
	
	private String id;
	private String renderTo;

	
	
	private Map<String, Object> attribute=new HashMap<String, Object>();
	/**
	 * @param key
	 * @param value
	 * @description   
	 */
	public abstract void putAttribute(Map<String, Object> attribute);
	
	public void putAttriValue(String key,Object value){
		attribute.put(key, value);
	}
	
	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}
	/**
	 * @return the attribute
	 */
	public final Map<String, Object> getAttribute() {
		putAttribute(attribute);		
		return attribute;
	}
	/**
	 * @param attribute the attribute to set
	 */
	public void setAttribute(Map<String, Object> attribute) {
		this.attribute = attribute;
	}


	/**
	 * @return the renderTo
	 */
	public String getRenderTo() {
		return renderTo;
	}


	/**
	 * @param renderTo the renderTo to set
	 */
	public void setRenderTo(String renderTo) {
		this.renderTo = renderTo;
	}
	
	
	

}
